<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
    <div class="mt20 pt10 mr20 ml10">
        <div class="cm-task-chapter">
            <dl style="cursor:pointer;" th:each="catalog,index : ${courseCatalogList}" th:classappend="${index.count}==1?'cOpen':''" th:if="!${#lists.isEmpty(courseCatalogList)}" class="cm-task-chpter-item live-cm-task-chpter-item">
               <th:block th:if="${catalog['nodeType']}==1" >
                <dt class="tchpter-item-parent txtOf">
                    <aside class="pull-right">
                        <span class="c-ccc fs14"><i class="fa fa-angle-up"></i></span>
                    </aside>
                    <a href="javascript:void(0);">
                        <span class="mr10 live-catalog-ico vam"></span>
                        <span class="fs16 c-333 vam" th:text="${catalog['catalogName']}"></span>
                    </a>
                </dt>
                <dd th:if="!${#lists.isEmpty(catalog['childCourseCatalogList'])}" class="tchpter-item-children" style="display: block;">
                    <ol>
                        <li th:each="child : ${catalog['childCourseCatalogList']}">
                            <aside th:if="${child['materialTypeKey']}=='LIVE'"  class="pull-right live-tchpter-item-children-right">
                                <span class="fs14 vam c-grey">
                                    <th:block th:text="${#strings.substring(child['lessonStartTime'],5,7)}+'月'+${#strings.substring(child['lessonStartTime'],8,10)}"></th:block><th:block th:if="!${#strings.equals(#strings.substring(child['lessonStartTime'],8,10),#strings.substring(child['lessonEndTime'],8,10))}" th:text="${#strings.substring(child['lessonEndTime'],7,10)}"></th:block>日
                                    <th:block th:text="${#strings.substring(child['lessonStartTime'],10,16)}+' - '+${#strings.substring(child['lessonEndTime'],10,16)}"></th:block>
                                </span>
                                <button th:if="${child['livePlayState']}==3 and ${child['replay']}==1" th:attrappend="data-course-id=${child['courseId']},data-id=${child['id']}" class="btn btn-rounded btn-default ml10 btn-spacing playback">查看回放</button>
                                <button th:if="${child['livePlayState']}==3 and ${child['replay']} !=1" th:attrappend="data-course-id=${child['courseId']},data-id=${child['id']}" class="btn btn-rounded btn-default ml10 btn-spacing end">已结束</button>
                                <button th:if="${child['livePlayState']}==1" th:attrappend="data-course-id=${child['courseId']},data-id=${child['id']}" class="btn btn-rounded btn-danger ml10 btn-spacing join">正在直播</button>
                                <button th:if="${child['livePlayState']}==2" class="btn btn-rounded btn-info btn-outline ml10 btn-spacing">未开始</button>
                                <button th:if="${child['livePlayState']}==4" th:attrappend="data-course-id=${child['courseId']},data-id=${child['id']}"   class="btn btn-rounded btn-info btn-outline ml10 btn-spacing join">提前进入</button>
                            </aside>
                            <a href="javascript:void(0);" class="txtOf play-catalog-box" th:attrappend="data-course-id=${child['courseId']},data-id=${child['id']}">
                                <i class="fa fa-circle fs12 mr10 vam c-ccc"></i>
                                <th:block th:text="${child['catalogName']}"></th:block>
                            </a>
                        </li>
                    </ol>
                </dd>
                   <dd th:if="${#lists.isEmpty(catalog['childCourseCatalogList'])}"class="tchpter-item-children" style="display: block;">
                       <section  class="no-data__wrap">
                           <span class="no-data-ico"></span>
                           <p class="mt20"><span class="c-666">直播课程目录没有内容~~</span></p>
                       </section>
                   </dd>

               </th:block>

                <th:block th:if="${catalog['nodeType']}==2" >
                    <dd  class="tchpter-item-parent" style="display: block;">
                        <ol>
                            <li>
                                <aside th:if="${catalog['materialTypeKey']}=='LIVE'"  class="pull-right live-tchpter-item-children-right">
                                <span class="fs14 vam c-grey">
                                    <th:block th:text="${#strings.substring(catalog['lessonStartTime'],5,7)}+'月'+${#strings.substring(catalog['lessonStartTime'],8,10)}"></th:block><th:block th:if="!${#strings.equals(#strings.substring(catalog['lessonStartTime'],8,10),#strings.substring(catalog['lessonEndTime'],8,10))}" th:text="${#strings.substring(catalog['lessonEndTime'],7,10)}"></th:block>日
                                    <th:block th:text="${#strings.substring(catalog['lessonStartTime'],10,16)}+' - '+${#strings.substring(catalog['lessonEndTime'],10,16)}"></th:block>
                                </span>
                                    <button th:if="${catalog['livePlayState']}==3 and ${catalog['replay']}==1" th:attrappend="data-course-id=${catalog['courseId']},data-id=${catalog['id']}" class="btn btn-rounded btn-default ml10 btn-spacing playback">查看回放</button>
                                    <button th:if="${catalog['livePlayState']}==3 and ${catalog['replay']} !=1" th:attrappend="data-course-id=${catalog['courseId']},data-id=${catalog['id']}" class="btn btn-rounded btn-default ml10 btn-spacing end">已结束</button>
                                    <button th:if="${catalog['livePlayState']}==1" th:attrappend="data-course-id=${catalog['courseId']},data-id=${catalog['id']}" class="btn btn-rounded btn-danger ml10 btn-spacing join">正在直播</button>
                                    <button th:if="${catalog['livePlayState']}==2" class="btn btn-rounded btn-info btn-outline ml10 btn-spacing">未开始</button>
                                    <button th:if="${catalog['livePlayState']}==4"  th:attrappend="data-course-id=${catalog['courseId']},data-id=${catalog['id']}"   class="btn btn-rounded btn-info btn-outline ml10 btn-spacing join">提前进入</button>

                                </aside>
                                <a href="javascript:void(0);" class="txtOf play-catalog-box" th:attrappend="data-course-id=${catalog['courseId']},data-id=${catalog['id']}">
                                    <i class="fa fa-circle fs12 mr10 vam c-ccc"></i>
                                    <th:block th:text="${catalog['catalogName']}"></th:block>
                                </a>
                            </li>
                        </ol>
                    </dd>
                </th:block>
            </dl>
            <section th:if="${#lists.isEmpty(courseCatalogList)}" class="no-data__wrap">
                <span class="no-data-ico"></span>
                <p class="mt20"><span class="c-666">直播课程还没有设置目录~~</span></p>
            </section>
        </div>
    </div>
</html>
